/* Header 组件样式 - 适配小程序环境 */

.header-container {
  position: sticky;
  top: 0;
  z-index: 20;
  background-color: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.header-content {
  padding: 0 32rpx;
}

.header-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24rpx 0;
}

/* 左侧区域 */
.header-left {
  display: flex;
  align-items: center;
  gap: 16rpx;
}

.back-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 72rpx;
  height: 72rpx;
  border-radius: 50%;
  transition: background-color 0.2s;

  &:active {
    background-color: #f5f5f5;
  }
}

.back-icon {
  font-size: 36rpx;
  color: #374151;
  font-weight: bold;
}

.title-wrapper {
  display: flex;
  align-items: center;
  gap: 16rpx;
}

.header-title {
  font-size: 40rpx;
  font-weight: bold;
  color: #111827;
}

/* 右侧区域 */
.header-right {
  display: flex;
  align-items: center;
  gap: 16rpx;
}

.nav-button {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 72rpx;
  padding: 0 24rpx;
  border-radius: 36rpx;
  border: 1px solid #e5e7eb;
  background-color: #ffffff;
  transition: background-color 0.2s;

  &:active {
    background-color: #f9fafb;
  }
}

.nav-icon {
  font-size: 36rpx;
  color: #374151;
  margin-right: 8rpx;
}

.nav-text {
  font-size: 28rpx;
  font-weight: 500;
  color: #374151;
}

.right-actions {
  display: flex;
  align-items: center;
  gap: 16rpx;
}

/* 响应式适配 */
@media (max-width: 750rpx) {
  .header-content {
    padding: 0 24rpx;
  }

  .nav-text {
    display: none;
  }

  .nav-button {
    width: 72rpx;
    padding: 0;
  }
}

/* 深色模式适配 */
@media (prefers-color-scheme: dark) {
  .header-container {
    background-color: #1f2937;
    box-shadow: 0 1px 3px rgba(255, 255, 255, 0.1);
  }

  .header-title {
    color: #f9fafb;
  }

  .back-icon,
  .nav-icon,
  .nav-text {
    color: #d1d5db;
  }

  .nav-button {
    border-color: #374151;
    background-color: #1f2937;

    &:active {
      background-color: #374151;
    }
  }

  .back-button:active {
    background-color: #374151;
  }
}
